<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GUnixSocketAddress</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO 参考手册">
<link rel="up" href="networking.html" title="Lowlevel network support">
<link rel="prev" href="gio-GInetSocketAddress.html" title="GInetSocketAddress">
<link rel="next" href="gio-GSocketControlMessage.html" title="GSocketControlMessage">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gio-GInetSocketAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO 参考手册</th>
<td><a accesskey="n" href="gio-GSocketControlMessage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gio-GUnixSocketAddress.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gio-GUnixSocketAddress.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gio-GUnixSocketAddress"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gio-GUnixSocketAddress.top_of_page"></a>GUnixSocketAddress</span></h2>
<p>GUnixSocketAddress — UNIX GSocketAddress</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gio-GUnixSocketAddress.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gunixsocketaddress.h&gt;

struct              <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress">GUnixSocketAddress</a>;
enum                <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType">GUnixSocketAddressType</a>;
<a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-new" title="g_unix_socket_address_new ()">g_unix_socket_address_new</a>           (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>);
<a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-new-abstract" title="g_unix_socket_address_new_abstract ()">g_unix_socket_address_new_abstract</a>  (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>);
<a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-new-with-type" title="g_unix_socket_address_new_with_type ()">g_unix_socket_address_new_with_type</a> (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a> type</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-is-abstract" title="g_unix_socket_address_get_is_abstract ()">g_unix_socket_address_get_is_abstract</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
<a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="returnvalue">GUnixSocketAddressType</span></a>  <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-address-type" title="g_unix_socket_address_get_address_type ()">g_unix_socket_address_get_address_type</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-path" title="g_unix_socket_address_get_path ()">g_unix_socket_address_get_path</a>      (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
<a href="../glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>               <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-path-len" title="g_unix_socket_address_get_path_len ()">g_unix_socket_address_get_path_len</a>  (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-abstract-names-supported" title="g_unix_socket_address_abstract_names_supported ()">g_unix_socket_address_abstract_names_supported</a>
                                                        (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gio-GUnixSocketAddress.description"></a><h2>Description</h2>
<p>
Support for UNIX-domain (also known as local) sockets.
</p>
<p>
UNIX domain sockets are generally visible in the filesystem.
However, some systems support abstract socket names which are not
visible in the filesystem and not affected by the filesystem
permissions, visibility, etc. Currently this is only supported
under Linux. If you attempt to use abstract sockets on other
systems, function calls may return <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a>
errors. You can use <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-abstract-names-supported" title="g_unix_socket_address_abstract_names_supported ()"><code class="function">g_unix_socket_address_abstract_names_supported()</code></a>
to see if abstract names are supported.
</p>
<p>
Note that <code class="filename">&lt;gio/gunixsocketaddress.h&gt;</code> belongs to
the UNIX-specific GIO interfaces, thus you have to use the
<code class="filename">gio-unix-2.0.pc</code> pkg-config file when using it.
</p>
</div>
<div class="refsect1">
<a name="gio-GUnixSocketAddress.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GUnixSocketAddress"></a><h3>struct GUnixSocketAddress</h3>
<pre class="programlisting">struct GUnixSocketAddress {
  GSocketAddress parent_instance;
};
</pre>
<p>
A UNIX-domain (local) socket address, corresponding to a
<span class="type">struct sockaddr_un</span>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GUnixSocketAddressType"></a><h3>enum GUnixSocketAddressType</h3>
<pre class="programlisting">typedef enum {
  G_UNIX_SOCKET_ADDRESS_INVALID,
  G_UNIX_SOCKET_ADDRESS_ANONYMOUS,
  G_UNIX_SOCKET_ADDRESS_PATH,
  G_UNIX_SOCKET_ADDRESS_ABSTRACT,
  G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
} GUnixSocketAddressType;
</pre>
<p>
The type of name used by a <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>.
<a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-PATH:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_PATH</code></a> indicates a traditional unix domain
socket bound to a filesystem path. <a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ANONYMOUS:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ANONYMOUS</code></a>
indicates a socket not bound to any name (eg, a client-side socket,
or a socket created with <code class="function">socketpair()</code>).
</p>
<p>
For abstract sockets, there are two incompatible ways of naming
them; the man pages suggest using the entire <code class="literal">struct
sockaddr_un</code> as the name, padding the unused parts of the
<code class="literal">sun_path</code> field with zeroes; this corresponds to
<a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a>. However, many programs
instead just use a portion of <code class="literal">sun_path</code>, and pass an appropriate
smaller length to <code class="function">bind()</code> or <code class="function">connect()</code>. This is
<a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-UNIX-SOCKET-ADDRESS-INVALID:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_INVALID</code></span></p></td>
<td>invalid
</td>
</tr>
<tr>
<td><p><a name="G-UNIX-SOCKET-ADDRESS-ANONYMOUS:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_ANONYMOUS</code></span></p></td>
<td>anonymous
</td>
</tr>
<tr>
<td><p><a name="G-UNIX-SOCKET-ADDRESS-PATH:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_PATH</code></span></p></td>
<td>a filesystem path
</td>
</tr>
<tr>
<td><p><a name="G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></span></p></td>
<td>an abstract name
</td>
</tr>
<tr>
<td><p><a name="G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></span></p></td>
<td>an abstract name, 0-padded
  to the full length of a unix socket name
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-new"></a><h3>g_unix_socket_address_new ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_unix_socket_address_new           (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>);</pre>
<p>
Creates a new <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> for <em class="parameter"><code>path</code></em>.
</p>
<p>
To create abstract socket addresses, on systems that support that,
use <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-new-abstract" title="g_unix_socket_address_new_abstract ()"><code class="function">g_unix_socket_address_new_abstract()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the socket path</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-new-abstract"></a><h3>g_unix_socket_address_new_abstract ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_unix_socket_address_new_abstract  (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_unix_socket_address_new_abstract</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-new-with-type" title="g_unix_socket_address_new_with_type ()"><code class="function">g_unix_socket_address_new_with_type()</code></a>.</p>
</div>
<p>
Creates a new <a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a>
<a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> for <em class="parameter"><code>path</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the abstract name. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=path_len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> gchar]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path_len</code></em> :</span></p></td>
<td>the length of <em class="parameter"><code>path</code></em>, or -1</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-new-with-type"></a><h3>g_unix_socket_address_new_with_type ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketAddress.html#GSocketAddress" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_unix_socket_address_new_with_type (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a> type</code></em>);</pre>
<p>
Creates a new <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> of type <em class="parameter"><code>type</code></em> with name <em class="parameter"><code>path</code></em>.
</p>
<p>
If <em class="parameter"><code>type</code></em> is <a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-PATH:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_PATH</code></a>, this is equivalent to
calling <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-new" title="g_unix_socket_address_new ()"><code class="function">g_unix_socket_address_new()</code></a>.
</p>
<p>
If <em class="parameter"><code>path_type</code></em> is <a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></a>, then <em class="parameter"><code>path_len</code></em>
bytes of <em class="parameter"><code>path</code></em> will be copied to the socket's path, and only those
bytes will be considered part of the name. (If <em class="parameter"><code>path_len</code></em> is -1,
then <em class="parameter"><code>path</code></em> is assumed to be NUL-terminated.) For example, if <em class="parameter"><code>path</code></em>
was "test", then calling <a class="link" href="gio-GSocketAddress.html#g-socket-address-get-native-size" title="g_socket_address_get_native_size ()"><code class="function">g_socket_address_get_native_size()</code></a> on the
returned socket would return 7 (2 bytes of overhead, 1 byte for the
abstract-socket indicator byte, and 4 bytes for the name "test").
</p>
<p>
If <em class="parameter"><code>path_type</code></em> is <a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a>, then
<em class="parameter"><code>path_len</code></em> bytes of <em class="parameter"><code>path</code></em> will be copied to the socket's path, the
rest of the path will be padded with 0 bytes, and the entire
zero-padded buffer will be considered the name. (As above, if
<em class="parameter"><code>path_len</code></em> is -1, then <em class="parameter"><code>path</code></em> is assumed to be NUL-terminated.) In
this case, <a class="link" href="gio-GSocketAddress.html#g-socket-address-get-native-size" title="g_socket_address_get_native_size ()"><code class="function">g_socket_address_get_native_size()</code></a> will always return
the full size of a <code class="literal">struct sockaddr_un</code>, although
<a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-path-len" title="g_unix_socket_address_get_path_len ()"><code class="function">g_unix_socket_address_get_path_len()</code></a> will still return just the
length of <em class="parameter"><code>path</code></em>.
</p>
<p>
<a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></a> is preferred over
<a class="link" href="gio-GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a> for new programs. Of course,
when connecting to a server created by another process, you must
use the appropriate type corresponding to how that process created
its listening socket.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>the name. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=path_len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> gchar]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path_len</code></em> :</span></p></td>
<td>the length of <em class="parameter"><code>path</code></em>, or -1</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-get-is-abstract"></a><h3>g_unix_socket_address_get_is_abstract ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_unix_socket_address_get_is_abstract
                                                        (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_unix_socket_address_get_is_abstract</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-address-type" title="g_unix_socket_address_get_address_type ()"><code class="function">g_unix_socket_address_get_address_type()</code></a></p>
</div>
<p>
Tests if <em class="parameter"><code>address</code></em> is abstract.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GInetSocketAddress.html#GInetSocketAddress" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the address is abstract, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-get-address-type"></a><h3>g_unix_socket_address_get_address_type ()</h3>
<pre class="programlisting"><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="returnvalue">GUnixSocketAddressType</span></a>  g_unix_socket_address_get_address_type
                                                        (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
<p>
Gets <em class="parameter"><code>address</code></em>'s type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GInetSocketAddress.html#GInetSocketAddress" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-get-path"></a><h3>g_unix_socket_address_get_path ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        g_unix_socket_address_get_path      (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
<p>
Gets <em class="parameter"><code>address</code></em>'s path, or for abstract sockets the "name".
</p>
<p>
Guaranteed to be zero-terminated, but an abstract socket
may contain embedded zeros, and thus you should use
<a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-path-len" title="g_unix_socket_address_get_path_len ()"><code class="function">g_unix_socket_address_get_path_len()</code></a> to get the true length
of this string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GInetSocketAddress.html#GInetSocketAddress" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the path for <em class="parameter"><code>address</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-get-path-len"></a><h3>g_unix_socket_address_get_path_len ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>               g_unix_socket_address_get_path_len  (<em class="parameter"><code><a class="link" href="gio-GUnixSocketAddress.html#GUnixSocketAddress" title="struct GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
<p>
Gets the length of <em class="parameter"><code>address</code></em>'s path.
</p>
<p>
For details, see <a class="link" href="gio-GUnixSocketAddress.html#g-unix-socket-address-get-path" title="g_unix_socket_address_get_path ()"><code class="function">g_unix_socket_address_get_path()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="gio-GInetSocketAddress.html#GInetSocketAddress" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the length of the path</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-socket-address-abstract-names-supported"></a><h3>g_unix_socket_address_abstract_names_supported ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_unix_socket_address_abstract_names_supported
                                                        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks if abstract unix domain socket names are supported.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if supported, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>